//
//  MTLiveListCell.m
//  MeToo
//
//  Created by 俊松何 on 2018/7/13.
//  Copyright © 2018年 tianxie. All rights reserved.
//

#import "MTLiveListCell.h"
@interface MTLiveListCell ()

@property (weak, nonatomic) IBOutlet UIImageView *coverimageView;
@property (weak, nonatomic) IBOutlet UILabel *nameLable;
@property (weak, nonatomic) IBOutlet UILabel *numberLable;

@end

@implementation MTLiveListCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}
-(void)setModel:(MTLiveModel *)model
{
    _model = model;
    [self.coverimageView sd_setImageWithURL:[NSURL URLWithString:model.cover] placeholderImage:nil];
    self.nameLable.text = model.title;
    self.numberLable.text = [NSString stringWithFormat:@"%d人观看",model.viewerCnt];
    if(model.viewerCnt == 0)
    {
        self.numberLable.text = nil;
    }
}

@end
